<style lang="scss" scoped="">
  @import '../style.scss';
</style>
<template>
  <div class='my_card_outer' style="height:50vh">
    <div class='my_card'>
      <div class="my_card_title">
        租户平均健康度
      </div>
      <div style="height:44vh" ref="myEchart">
        fdsf

      </div>
    </div>

  </div>

</template>

<script>
  import echarts from 'echarts'
  export default {
    name:'mean_status',
    mounted() {
      this.initChart();
      
    },
    methods:{
      initChart(){
        var myChart= echarts.init(this.$refs.myEchart);
        var option = {
     
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
          },
          toolbox: {
            feature: {
              restore: {},
              saveAsImage: {}
            }
          },
          series: [
            {
              name: '业务指标',
              type: 'gauge',
              detail: {
                formatter:'{value}分',
                fontSize:document.body.clientHeight/100*2,
                backgroundColor:'rgba(35,40,44,1)'
              },
              data: [{value: 50, name: '完成率'}]
            }
          ]
        };

        setInterval(function () {
          option.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
          myChart.setOption(option, true);
        },2000);
      }
    }
  }
</script>

